package com.jic.manager.service;

import com.jic.common.base.vo.Page;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.manager.entity.SysUser;
import com.jic.manager.request.SysUserRequest;
import com.jic.manager.request.UserAuthorRequest;
import com.jic.manager.request.UccUserRequest;
import com.jic.manager.request.UpdateUccUserStatusRequest;
import com.jic.manager.response.SysUserResponse;
import com.jic.manager.response.UccUserResponse;

import java.util.Date;
import java.util.List;

/**
* 后台用户管理
* @author : 
* @email : 
* @since : 2020-02-25 05:29:32
* @version : v1.0.0
*/
public interface SysUserService {

    long insert(SysUser sysUser);

    long delete(Long id);

    long update(SysUser sysUser);

    SysUser queryByPrimaryKey(Long id);

    List<SysUser> query(SysUser sysUser);

    PageResult<SysUser> queryPage(SysUser sysUser, Page pageQuery);

    RestResult<String> editSysUser(SysUserRequest sysUserRequest);

    RestResult<String> deleteSysUser(SysUserRequest sysUserRequest);

    /*
    * 新增用户 返回新增的id
    * */
    Long insertSysUser(SysUser sysUser) throws Exception;

    RestResult<List<UccUserResponse>> getUccUserListByEmployinfo(UccUserRequest uccUserRequest);

    /**
     * 新增用户数据及数据权限
     * @param uccUserAuthorRequest
     * @return
     * @throws Exception
     */
    RestResult<Boolean> saveUserInfoAuthor (UserAuthorRequest uccUserAuthorRequest) throws Exception;

    /**
     * 编辑用户数据及数据权限
     * @param uccUserAuthorRequest
     * @return
     * @throws Exception
     */
    RestResult<Boolean> updateUserInfoAuthor (UserAuthorRequest uccUserAuthorRequest) throws Exception;

    RestResult<Boolean> updateUccUserStatus(UpdateUccUserStatusRequest updateUccUserStatusRequest);

    List<String> userPhone(Date date);
}